package text_file_processing;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class TextReader {
	
	public static StringBuilder getText(String filePath) throws IOException{
		BufferedReader reader = new BufferedReader(new FileReader(filePath));
		StringBuilder sb = new StringBuilder();
		String line = null;
		
		while ((line = reader.readLine()) != null) {
			sb.append(line).append(" ");
		}
		reader.close();
	
		return sb;
	}
}
	
	